<html>
<head><meta charset="utf-8"><title>Unix sockets and ancillary data · t-libs · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/index.html">t-libs</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html">Unix sockets and ancillary data</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="207906851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207906851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207906851">(Aug 24 2020 at 22:55)</a>:</h4>
<p>Could someone take a look at <a href="https://github.com/rust-lang/rust/pull/69864">https://github.com/rust-lang/rust/pull/69864</a> ? I provided some feedback that got it to what I think is a workable state, but I'm not an approver for that area.</p>



<a name="207964184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207964184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207964184">(Aug 25 2020 at 13:45)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> are you looking for API or code review?</p>



<a name="207972227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207972227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207972227">(Aug 25 2020 at 14:47)</a>:</h4>
<p>Primarily the latter. I think the API seems reasonable now, but of course that feedback is welcome too.</p>



<a name="207972694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207972694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207972694">(Aug 25 2020 at 14:50)</a>:</h4>
<p>Hm. Generally speaking we're trying to move out code review into libs-impl.</p>
<p>It looks like it's adding a lot of code -- I guess everything added is unstable? It might make sense to just merge; I can look over the code if you think that would be helpful -- not sure how much review you've already done.</p>



<a name="207973849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207973849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207973849">(Aug 25 2020 at 14:59)</a>:</h4>
<p>I've done fairly thorough review, but libs aren't my area so there might be something I missed.</p>



<a name="207973994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207973994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207973994">(Aug 25 2020 at 14:59)</a>:</h4>
<p>The biggest piece of the patch is splitting a file that would otherwise pass the soft file size limit.</p>



<a name="207974086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207974086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207974086">(Aug 25 2020 at 15:00)</a>:</h4>
<p>And then the ancillary handling is all new code.</p>



<a name="207974163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207974163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207974163">(Aug 25 2020 at 15:01)</a>:</h4>
<p>I am personally inclined to just say "good enough" if you've done a fairly thorough review</p>



<a name="207975307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207975307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207975307">(Aug 25 2020 at 15:09)</a>:</h4>
<p>Could you give a quick check that the marking of things as unstable is done correctly and nothing was missed/insta-stable? As long as that much is right, then sure.</p>



<a name="207975382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207975382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207975382">(Aug 25 2020 at 15:09)</a>:</h4>
<p>That's the kind of thing I'm not yet used to checking for.</p>



<a name="207975471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207975471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207975471">(Aug 25 2020 at 15:10)</a>:</h4>
<p>yeah, left two comments</p>



<a name="207975499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207975499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207975499">(Aug 25 2020 at 15:10)</a>:</h4>
<p>stable trait impls on stable types will be insta-stable, regardless of the attribute</p>



<a name="207975523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207975523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207975523">(Aug 25 2020 at 15:10)</a>:</h4>
<p>otherwise, the compiler will warn you if you're missing stable/unstable</p>



<a name="207975634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207975634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207975634">(Aug 25 2020 at 15:11)</a>:</h4>
<p>I suppose even unstable trait impls can have stable implications if they're used indirectly, like <code>Try</code></p>



<a name="207975779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207975779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207975779">(Aug 25 2020 at 15:12)</a>:</h4>
<p>yeah I'm not clear on whether <code>TryFrom&lt;SomeType&gt; for SomeUnstableType</code> is observable</p>



<a name="207975790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207975790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207975790">(Aug 25 2020 at 15:12)</a>:</h4>
<p>seems better to be on the safe side.</p>



<a name="207978723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207978723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pickfire <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207978723">(Aug 25 2020 at 15:33)</a>:</h4>
<p>The patch looks too long, kinda hard to read all at once.</p>



<a name="207979498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207979498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pickfire <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207979498">(Aug 25 2020 at 15:39)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="cp">#[cfg(any(</span>
<span class="cp">    target_os = </span><span class="s">&quot;haiku&quot;</span><span class="cp">,</span>
<span class="cp">    target_os = </span><span class="s">&quot;solaris&quot;</span><span class="cp">,</span>
<span class="cp">    target_os = </span><span class="s">&quot;illumos&quot;</span><span class="cp">,</span>
<span class="cp">    target_os = </span><span class="s">&quot;macos&quot;</span><span class="cp">,</span>
<span class="cp">    target_os = </span><span class="s">&quot;ios&quot;</span><span class="cp">,</span>
<span class="cp">    target_os = </span><span class="s">&quot;freebsd&quot;</span><span class="cp">,</span>
<span class="cp">    target_os = </span><span class="s">&quot;dragonfly&quot;</span><span class="cp">,</span>
<span class="cp">    target_os = </span><span class="s">&quot;openbsd&quot;</span><span class="cp">,</span>
<span class="cp">    target_os = </span><span class="s">&quot;netbsd&quot;</span><span class="cp">,</span>
<span class="cp">    target_os = </span><span class="s">&quot;linux&quot;</span><span class="cp">,</span>
<span class="cp">    target_os = </span><span class="s">&quot;android&quot;</span><span class="cp">,</span>
<span class="cp">    target_os = </span><span class="s">&quot;emscripten&quot;</span><span class="cp">,</span>
<span class="cp">    target_os = </span><span class="s">&quot;fuchsia&quot;</span><span class="cp">,</span>
<span class="cp">    target_env = </span><span class="s">&quot;uclibc&quot;</span><span class="cp">,</span>
<span class="cp">))]</span><span class="w"></span>
</code></pre></div>



<a name="207979532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207979532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pickfire <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207979532">(Aug 25 2020 at 15:39)</a>:</h4>
<p>Wow, I wish there is something like <code>matches!</code> there, or  maybe a variable or something to shorten it.</p>



<a name="207980158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207980158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207980158">(Aug 25 2020 at 15:45)</a>:</h4>
<p>I would at least sort it, so humans can easily tell if an OS is in that list</p>



<a name="207981951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207981951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pickfire <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207981951">(Aug 25 2020 at 16:00)</a>:</h4>
<p>Maybe you could comment in the post <span class="user-mention" data-user-id="138448">@cuviper</span> ?</p>



<a name="207984887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207984887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207984887">(Aug 25 2020 at 16:24)</a>:</h4>
<p>IMO there needs to be a T-libs decision on whether it is acceptable to have public api in <code>os::unix</code> based on <code>target_os</code>.</p>



<a name="207984945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207984945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207984945">(Aug 25 2020 at 16:25)</a>:</h4>
<p>like I wrote in my comment, so far everything inside <code>os::unix</code> was available as long as <code>cfg(unix)</code> held.</p>



<a name="207993293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207993293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207993293">(Aug 25 2020 at 17:25)</a>:</h4>
<p>Do we have any unix targets that aren't included in the list above? Is the <code>#[cfg]</code> here even necessary?</p>



<a name="207993353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207993353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207993353">(Aug 25 2020 at 17:25)</a>:</h4>
<p>Unix sockets and sending fds over them should be supported by any platform that claims to be unix.</p>



<a name="207993479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207993479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207993479">(Aug 25 2020 at 17:26)</a>:</h4>
<p><code>vxworks</code>?</p>



<a name="207993755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207993755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207993755">(Aug 25 2020 at 17:28)</a>:</h4>
<p><code>redox</code>?</p>



<a name="207994001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207994001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Steven Fackler <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207994001">(Aug 25 2020 at 17:30)</a>:</h4>
<p>It seems like the APIs should just be stubbed out and return errors on those platforms</p>



<a name="207994063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/207994063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#207994063">(Aug 25 2020 at 17:30)</a>:</h4>
<p>also <code>target_env = newlib</code>.</p>



<a name="208022164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/208022164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#208022164">(Aug 25 2020 at 20:54)</a>:</h4>
<p>My understanding is that it was originally written for all Unix platforms, and then a request on the issue asked for it to be limited to platforms for which the public headers documented the necessary details.</p>



<a name="208043688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/208043688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#208043688">(Aug 26 2020 at 01:17)</a>:</h4>
<p>This was in response to Amanieu’s question on what platforms aren’t in this list that are otherwise <code>cfg(unix)</code></p>



<a name="208050567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Unix%20sockets%20and%20ancillary%20data/near/208050567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Unix.20sockets.20and.20ancillary.20data.html#208050567">(Aug 26 2020 at 03:50)</a>:</h4>
<p>I understand that. I think that list was written without regard for if it was the complete list for Unix.</p>
<p>That said, I don't think it is.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>